import Vue from "vue";
import VueRouter from "vue-router";
import vueRunning from "@/views/vueRunning.vue";
Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/runningcode/template"
  },
  //代码running页
  {
    path: "/runningcode/:codename",
    name: "vueRunning",
    components: {
      default: vueRunning
    }
  }
];

const router = new VueRouter({
  mode: "hash",
  base: "running", //process.env.BASE_URL
  routes
});
export default router;
